package com.java.java8.util.functioninterfacedemo;

import java.util.Random;
import java.util.UUID;
import java.util.function.Supplier;

/**
 * @author liyanhao
 * @Date 2023-03-26 18:37
 */
public class SupplierDemo1 {

    public static void main(String[] args) {
        testSupplierWirhLambda();
    }

    public static void testSupplierWirhLambda(){
        final Random random = new Random();
       UUID(()->{
           return UUID.randomUUID().toString().replace("-", "");
       });


    }

    public static void UUID(Supplier<String> lazyValue) {
        System.out.println(lazyValue.get());
    }
}